<template>
    <!-- 商品列表 -->
    <view class="guess-item">
        <!-- 图片 -->
        <image class="image" :src="item.picture"></image>
        <!-- 介绍 -->
        <view class="name">
            {{item.desc}}
        </view>
        <!-- 价格 -->
        <view class="price">
            <view class="small">¥</view>
            <text>{{item.price}}</text>
        </view>
    </view>
</template>
<script>
    export default {
        name: "my-like",
        props: {
            item: {
                type: Object,
                default: {}
            }
        },
        data() {
            return {

            };
        },
        methods: {

        }
    }
</script>

<style lang="scss">
    * {
        margin: 0;
    }

    view,
    navigator,
    input,
    scroll-view {
        box-sizing: border-box;
    }

    // navigator {
    //     display: block;
    //     height: auto;
    //     width: auto;
    // }

    .guess-item {
        width: 345rpx;
        padding: 24rpx 20rpx 20rpx;
        margin-bottom: 20rpx;
        border-radius: 10rpx;
        overflow: hidden;
        background-color: #fff;
    }

    .guess-item .image {
        width: 304rpx;
        height: 260rpx;
    }

    .image {
        display: inline-block;
        height: 240px;
        overflow: hidden;
        width: 320px;
        vertical-align: middle;
    }

    .guess-item .name {
        height: 75rpx;
        margin: 10rpx 0;
        font-size: 26rpx;
        color: #262626;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .guess-item .price {
        display: flex;
        line-height: 1;
        padding-top: 4rpx;
        color: #cf4444;
        font-size: 26rpx;
    }

    .guess-item .small {
        font-size: 80%;
    }

    text {
        cursor: text;
    }
</style>